<script src="app/controllers/admin/blogs/ListTopicController.js"></script>

<div id="hfr-adminListTopics" class="container hfr-margin-auto" ng-controller="AdminListTopicController">
	<form class="hfr-adminFormListTopics">
		<h2 class="hfr-heading">Topics</h2>
		<div class="row">
		
			<!-- List topics -->
			<div class="col-md-6">
				<div class="row">
					<div class="col-md-8">
						<div class="input-group">
							<input type="text" class="form-control" placeholder="Enter Topics" ng-keypress="addTopic($event)" ng-model="topicName">
							<span class="input-group-addon ti-folder"></span>
						</div>
					</div>
				</div>
				<hr />
				<ul class="hfr-listTopics hfr-inputStyle">
					<li ng-repeat="topic in topics">
						<input id="hfr-topic{{$index}}" type="checkbox" ng-change="changeSelect()" ng-model="checkTopics[topic.id]" value="{{topic.id}}">
						<label for="hfr-topic{{$index}}">{{topic.name}}</label>
						<span class="hfr-icon ti-arrow-circle-down" ng-click="showSitemapOfTopic(topic.id)"></span>
						<div class="hfr-viewSitemap" ng-show="showSitemapOfTopic[topic.id]">
							<ul>
								<li ng-repeat="smtp in sitemapsOfTopics[topic.id]">
									<div class="hfr-featured">
										<input id="hfr-sitemap-1" name="hfr-sitemap-1" type="checkbox">
										<label for="hfr-sitemap-1"></label>
									</div>
									<a href="{{smtp.sitemapId}}" target="_blank">{{smtp.sitemapId}}</a>
								</li>
							</ul>
							<div class="content-center" ng-show="sitemapOfTopicShowPrev[topic.id] || sitemapOfTopicShowNext[topic.id]">
								<ul class="pager">				
									<li ng-class="{true:'active', false:'disabled'}[sitemapOfTopicShowPrev[topic.id]]" ng-click="prevSitemapOfTopicPage(topic.id)"><a href>&larr; Previous</a></li>
									<li ng-class="{true:'active', false:'disabled'}[sitemapOfTopicShowNext[topic.id]]" ng-click="nextSitemapOfTopicPage(topic.id)"><a href>Next &rarr;</a></li>
								</ul>
							</div>
						</div>
					</li>
				</ul>
			</div>
			
			<!-- List sitemap -->
			<div class="col-md-6">
				<div class="row">
					<div class="col-md-12">
						<div class="input-group">
							<input type="text" class="form-control" placeholder="Search Sitemap" ng-keypress="searchSitemap($event)" ng-model="keyword">
							<span class="input-group-addon ti-world"></span>
						</div>
					</div>
				</div>
				<hr />
				<ul class="hfr-listSite hfr-inputStyle">
					<li ng-repeat="sitemap in sitemaps">
						<div class="hfr-siteSelected">
							<input name="site-selected" id="hfr-sitemap{{$index}}" type="radio" ng-click="choiseSitemap(sitemap.url)" ng-model="sitemapOpt" value="{{sitemap.url}}">
							<label for="hfr-sitemap{{$index}}">
								{{sitemap.url}}
							</label>
							<div class="hfr-topicSelected">
								<span ng-repeat="tp in sitemap.topics">{{tp.id}} <span class="ti-close" ng-click="removeTopic(tp.id)"></span></span>
							</div>
						</div>
					</li>
				</ul>
				<div class="content-center" ng-show="sitemapShowPrev || sitemapShowNext">
					<ul class="pager">				
						<li ng-class="{true:'active', false:'disabled'}[sitemapShowPrev]" ng-click="prevSitemapPage()"><a href>&larr; Previous</a></li>
						<li ng-class="{true:'active', false:'disabled'}[sitemapShowNext]" ng-click="nextSitemapPage()"><a href>Next &rarr;</a></li>
					</ul>
				</div>
			</div>
		</div>
	</form>
</div>